<?php

use think\facade\Route;

$UserController = 'app\admin\controller\UserController@';
Route::group('user/', function () use ($UserController) {
	Route::get('index', $UserController . 'index');
	Route::get('send', $UserController . 'send');
	Route::post('uploadImg', $UserController . 'uploadImg');
	Route::post('uploadOne', $UserController . 'uploadOne');
	Route::post('strEncode', $UserController . 'strEncode');
	Route::post('strDecode', $UserController . 'strDecode');
	Route::post('computing', $UserController . 'computing');
	Route::post('insert', $UserController . 'insert');
	Route::post('registered', $UserController . 'registered');
	Route::post('userDetail', $UserController . 'userDetail')->middleware([\app\admin\middleware\Token::class]);
});

$IndexController = 'app\admin\controller\IndexController@';
Route::group('index/', function () use ($IndexController) {
	Route::get('index', $IndexController . 'index');
	Route::get('dataPanel', $IndexController . 'dataPanel');
	Route::get('imgListPage', $IndexController . 'imgListPage');
	Route::get('getCodeTool', $IndexController . 'getCodeTool');
	Route::get('Viewupload', $IndexController . 'Viewupload');

	Route::get('tree', $IndexController . 'tree');
});

$LoginController = 'app\admin\controller\loginController@';
Route::group('login/', function () use ($LoginController) {
	Route::post('login', $LoginController . 'login');
	Route::post('loginOut', $LoginController . 'loginOut')->middleware([\app\admin\middleware\Token::class]);
});
